package com.nextbus.model;

import java.util.ArrayList;
import java.util.Collection;

public class Stop {
    private String tag;
    private String lat;
    private String lon;
    private String title;
    //为了保存预测信息
    private ArrayList<Prediction>predictions;
    public Stop(String tag, String lat, String lon, String title) {
        super();
        this.tag = tag;
        this.lat = lat;
        this.lon = lon;
        this.title = title;
    }
    public String getTag() {
        return tag;
    }
    public void setTag(String tag) {
        this.tag = tag;
    }
    public String getLat() {
        return lat;
    }
    public void setLat(String lat) {
        this.lat = lat;
    }
    public String getLon() {
        return lon;
    }
    public void setLon(String lon) {
        this.lon = lon;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    @Override
    public int hashCode() {
        return tag.hashCode() + title.hashCode();
    }
    @Override
    public boolean equals(Object o) {
        if(o == null) {
            return false;
        }
        if(!(o instanceof Stop)) {
            return false;
        }
        Stop stop = (Stop)o;
        return stop.getTag().equals(this.getTag());
    }
	public ArrayList<Prediction> getPredictions() {
		return predictions;
	}
	public void setPredictions(ArrayList<Prediction> predictions) {
		this.predictions = predictions;
	}
   
}
